package com.wabi.frame.components;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.ImageIcon;
import javax.swing.JTabbedPane;

import com.wabi.utils.ImageProvider;

public class TabbedPane extends JTabbedPane {

	private SettingsTab sTab;
	private PlaneTab pTab; 

	public TabbedPane(){
		this.setLayout(new GridLayout(1, 1));
		ImageIcon icon = ImageProvider.createImageIcon("plane1.jpg");
		this.setBackground(new Color(255,255,255));

		sTab = new SettingsTab();
		pTab = new PlaneTab();
		this.addTab("settings", icon, sTab, "Shows settings");
		this.addTab("plane view", icon, pTab, "Shows airplane");
		this.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

	}

	public SettingsTab getSettingTab(){
		return sTab;
	}

	public PlaneTab getPlaneTab(){
		return pTab;
	}
}
